package  
{
	import org.puremvc.as3.patterns.facade.Facade;

	/**
	 * 
	 * 单例模式类
	 * @author 郑子华
	 */
	public class ApplicationFacade extends Facade
	{
		private static var _instance:ApplicationFacade = null;
		public function ApplicationFacade(single:Single) 
		{
			super();
			
			if(single == null)
			{
				throw new Error("Can't create instance , Single is Null!");
			}
		}
		/**
		 * 单例引用
		 */
		public static function get instance():ApplicationFacade
		{
			if(_instance == null)
			{
				_instance = new ApplicationFacade(new Single());
			}
			return _instance;
		}
	}
}
class Single{}